'use strict';

module.exports = app => {
  const { INTEGER, DATE, ENUM } = app.Sequelize;

  return app.model.define('user_collect', {
    id: {
      type: INTEGER,
      primaryKey: true,
      autoIncrement: true
    },
    user_id: INTEGER,
    collect_id: INTEGER,
    type: {
      type: ENUM('job','shift_work'),  // 收藏类型：职位
      allowNull: false
    },
    created_at: DATE,
    updated_at: DATE,
  }, {
    tableName: 'user_collects',
    timestamps: true,
  });
};
